package com.chilly.other.spring.listener;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ApplicationEventTest {

    public static void main(String[] args) {
        String resourceFile = "classpath:spring-context.xml";
        ApplicationContext ctx = new ClassPathXmlApplicationContext(resourceFile);
        MailSender mailSender = ctx.getBean(MailSender.class);
        mailSender.sendMail("test mail.");
        System.out.println("done.");
    }
}